import java.util.ArrayList;


public class SkipListNode implements Comparable<SkipListNode>
{
	private int _value;

	public int get_value() {
		return _value;
	}

	public void set_value(int _value) {
		this._value = _value;
	}
	
	private ArrayList<SkipListNode> _parentSkipList;

	public ArrayList<SkipListNode> get_parentSkipList() {
		return _parentSkipList;
	}

	public void set_parentSkipList(ArrayList<SkipListNode> _parentSkipList) {
		this._parentSkipList = _parentSkipList;
	}
	
	private SkipListNode _parentSkipListNode;
	
	public SkipListNode get_parentSkipListNode() {
		return _parentSkipListNode;
	}

	public void set_parentSkipListNode(SkipListNode _parentSkipListNode) {
		this._parentSkipListNode = _parentSkipListNode;
	}
	
	// Konstruktor
	public SkipListNode(int value, ArrayList<SkipListNode> arrayList, SkipListNode parentSkipListNode)
	{
		this.set_parentSkipList(arrayList);
		this.set_parentSkipListNode(parentSkipListNode);
		this.set_value(value);
	}

	@Override
	public int compareTo(SkipListNode node) 
	{
		int result = this.get_value() - node.get_value();
		return (int) Math.signum(result);
		 
	}
	
	@Override
	public boolean equals(Object obj) {
		if (obj.getClass() != SkipListNode.class)
			return false;
		SkipListNode rhs = (SkipListNode) obj;
		return this.get_value() == rhs.get_value();
	}

}
